/**
 * 求子树权值和，单点修改
 * 令
 * Di = Li + Dhi
 * Li = SIGMA{Dj, j是i的轻儿子}
 * 写成矩阵形式
 * | Di | = | 1  Li | * | Dhi |
 * |  1 |   | 0   1 |   |  1  |
 * 
 * 树链剖分以后，用线段树维护矩阵乘积
 * 则 Dx = 线段树上查询[x, bot]的区间信息
 * 其中bot指x所在重链的叶子节点
 * 
 * 修改操作，顺着重链往上依次修改即可，log时间可完成
 * 
 * D在第一遍dfs求出，L在第二遍dfs求出
 */
#include <bits/stdc++.h>
#include <bits/extc++.h>
using namespace std;

struct HLD{ // 重链剖分

using llt = long long;

using value_type = llt;
vector<value_type> data; // 线段树

using dp_type = llt; // 规划目标的数据类型

vector<dp_type> D;
vector<dp_type> L;

/// 从下往上计算信息，要变动
value_type _up_(const value_type & ls, const value_type & rs) {
    return ls + rs;
}

/// 辅助函数，视线段树信息类型而变动
static const value_type & value_zero() {
    static const value_type VALUE0 = 0;
    return VALUE0;
}

/// 几乎不用动
value_type _query(int t, int s, int e, int a, int b) {
    if(a <= s and e <= b) {
        return data[t];
    }

    int mid = (s + e) >> 1;
    value_type ans = value_zero();
    if(a <= mid) ans = _up_(ans, _query(lson(t), s, mid, a, b));
    if(mid < b) ans = _up_(ans, _query(rson(t), mid + 1, e, a, b));
    return ans;
}

/// 几乎不用动
void _modify(int t, int s, int e, int pos, const dp_type & delta) {
    if(s == e) {
        data[t] = delta;
        return;
    }

    int mid = (s + e) >> 1;
    if(pos <= mid) _modify(lson(t), s, mid, pos, delta);
    else _modify(rson(t), mid + 1, e, pos, delta);
    _pushUp(t);
    return;
}

/// 这个函数不用动
void _pushUp(int t) {
    data[t] = _up_(data[lson(t)], data[rson(t)]);
}

/// 这两个函数不用变动
static int lson(int x) {return x << 1;}
static int rson(int x) {return lson(x) | 1;}

int N;
/// 树结构, 1-index
vector<vector<int>> g;
/// 点权值
vector<llt> weight;

/// 建单向边
void mkDiEdge(int a, int b){
    g[a].push_back(b);
}
/// 建双向边
void mkBiEdge(int a, int b){
    mkDiEdge(a, b); mkDiEdge(b, a);
}

/// 树链剖分结构
struct node_t{
    int parent; // 父节点
    int hson;   // 重儿子
    int depth;  // 该节点的深度, 根节点深度为0
    int size;   // 本节点所领子树的节点总数
    int top;    // 本节点所在重链的顶，新编号
    int bot;    // 本节点所在重链的底，新编号
    int nid;    // 本节点在线段树中的编号, 即dfs序
};

int root; // 树根
vector<int> nid2old; // nid2old[i]表示线段树中第i个节点在原树中的编号
int timestamp; // 辅助变量
vector<node_t> nodes;

/// 递归找重边
void _dfsHeavyEdge(int u, int p, int d){
    auto & n = nodes[u];
    n.parent = p;
    n.depth = d;
    n.size = 1;

    /// 计算D
    D[u] = weight[u];

    for(auto v : g[u]){
        if(v == p) continue;
        _dfsHeavyEdge(v, u, d + 1);
        n.size += nodes[v].size;
        if(nodes[n.hson].size < nodes[v].size) n.hson = v;

        D[u] += D[v]; 
    }
    return;
}

/// 递归找重链
void _dfsHeavyPath(int u, int top){
    auto & n = nodes[u];
    n.top = top;
    nid2old[n.nid = ++timestamp] = u;

    /// 计算L
    L[u] = weight[u];

    if(0 == n.hson) return (void)(n.bot = n.nid);
    _dfsHeavyPath(n.hson, top);
    n.bot = nodes[n.hson].bot;

    for(auto v : g[u]){
        if(v != n.parent and v != n.hson){
            _dfsHeavyPath(v, v);
            
            L[u] += D[v]; 
        }
    }
    return;
}
/// 递归建线段树
void _build(int t, int s, int e) {
    if(s == e) {
        // 注意线段树编号与原树编号存在转换
        data[t] = weight[nid2old[s]];
        return; 
    }
    int mid = (s + e) >> 1;
    _build(lson(t), s, mid);
    _build(rson(t), mid + 1, e);
    _pushUp(t);
}

/// 初始化, n是树的点数
void init(int n){
    N = n;
    timestamp = 0;
    /// 初始化树结构
    g.assign(N + 1, {});
    weight.assign(N + 1, 0);
    /// 初始化树链结构
    nodes.assign(N + 1, {0, 0, 0, 0, 0, 0, 0});
    nid2old.assign(N + 1, 0);
    /// 初始化线段树结构
    data.assign(N + 1 << 2, value_zero()); 
    /// 初始化DP
    D.assign(N + 1, {});
    L.assign(N + 1, {});
    return;
}

/// 在输入所有数据以后构建
void build(int root){
    /// 建树链
    _dfsHeavyEdge(this->root = root, 0, 0);
    _dfsHeavyPath(root, root);
    /// 建线段树
    _build(1, 1, N);
}

/// 查询D[x]
value_type query(int x){
    return _query(1, 1, N, nodes[x].nid, nodes[x].bot);
}

void modify(int x, llt delta){
    if(0 == delta) return;

    weight[x] += delta;
    auto oldL = L[x];
    dp_type newL = oldL + delta;

    while(1){
        auto top = nodes[x].top;
        /// 查询旧的Dtop
        const auto oldTop = query(top); 
        /// 修改x
        _modify(1, 1, N, nodes[x].nid, L[x] = newL);
        /// 查询新的Dtop
        const auto curTop = query(top);
        if(curTop == oldTop) break;

        auto parent = nodes[top].parent;
        if(0 == parent) break;

        oldL = L[parent];
        newL = oldL + curTop - oldTop;

        x = parent;
    }

    return;
}


};



HLD Tree;
int N, Q, Root;

void work(){
    cin >> N >> Q >> Root;
    Tree.init(N);
    for(int i=1;i<=N;++i) cin >> Tree.weight[i];
    for(int a,b,i=1;i<N;++i){
        cin >> a >> b;
        Tree.mkBiEdge(a, b);
    }    
    Tree.build(Root);
    for(int cmd,a,x,q=1;q<=Q;++q){
        cin >> cmd >> a;
        // cout << q << ": " << cmd << ", " << a << endl;
        if(2 == cmd){
            auto ans = Tree.query(a);
            cout << ans << "\n";
        }else{
            cin >> x;
            Tree.modify(a, x);
        }
    }
    return;
}

int main(){
#ifndef ONLINE_JUDGE
    freopen("z.txt", "r", stdin);
#endif
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    int nofkase = 1;
    // cin >> nofkase;
    while(nofkase--) work();
    return 0;
}